package com.yulong.web.controller;

import com.github.pagehelper.PageInfo;
import com.yulong.model.pojo.UmsMenu;
import com.yulong.model.pojo.UmsResourceCategory;
import com.yulong.model.pojo.UmsRole;
import com.yulong.web.mapper.UmsResourceMapper;
import com.yulong.web.server.UmsResourceCategoryServer;
import com.yulong.web.server.UmsRoleServer;
import com.yulong.web.utils.ResponseMap;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@RestController
@Api("后台资源菜单管理")
@RequestMapping("resourceCategory")
public class UmsResourceCategoryController {

    @Autowired
    private UmsResourceCategoryServer resourceCategoryServer;


    @ApiOperation("获取所有分类资源")
    @GetMapping("listAll")
    private ResponseMap listAll(){
        List<UmsResourceCategory> umsResourceCategories = resourceCategoryServer.listAll();
        return ResponseMap.ok(umsResourceCategories) ;
    }

}
